<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>寻找字符串</title>
    <script type="text/javascript">
        var str="Are You Ok ";
        var result="";
        for(var i=0;i<str.length;i++)
        {
            if (str.charAt(i)<"o"){
                result+=str.charAt(i)+",";

            }
        }
        document.write(result);
    </script>
</head>
<body>

</body>
</html>
